from pydantic import BaseModel


# 输入数据查询条件
class data_page(BaseModel):
    user_id: str
    project_id: str


# 输入数据查询条件
class data_query(BaseModel):
    name: list = ["dqw1-1"]
    type: list = ["压裂"]
    plan: str = "测试1"
    year: str = "2021"


class data_save(BaseModel):
    User_ID: str
    Proj_ID: str
    dvpUnit_Name: str
    stimType_Name: str
    well_Name: str  # 井名称
    year: str
    Stim_ValidPeriod_Average: int = None  # 平均有效期
    Stim_IncreOil_Average: float = None  # 平均措施增油
    StimCost_Average: float = None  # 平均作业成本
    Oil_OprCost: float = None  # 吨油操作成本
    Oil_Price: float = None  # 平均油价无，此处读取为原油价格
    StimOil_CommodityRatio: float = None  # 原油商品率
    OilSale_TotalTaxRatio: float = None  # 平均销售税费率无，此处读取销售税费率
    Money_Discount: float = None  # 资金贴现率
    parameter_set: str = None  # 油敏参数设置
    analysis_data: str = None  # 盈亏计算结果
    calculation_type: str = None  # 计算类型，油价、措施增油、作业成本
    OilPriceCritical: float = None  # 临界油价
    IncreOilCritical: float = None  # 临界措施增油
    StimCostCritical: float = None  # 临界作业成本
    DvpUnit_OilStim_PlanProj_Name: str  # 措施方案
    Forecast_Method: str  # 预测方法


class data(BaseModel):
    Stim_ValidPeriod_Average: float  # 平均有效期
    Stim_IncreOil_Average: float  # 平均措施增油
    StimCost_Average: float  # 平均作业成本
    Oil_OprCost: float  # 吨油操作成本
    Oil_Price: float  # 平均油价无，此处读取为原油价格
    StimOil_CommodityRatio: float  # 原油商品率
    OilSale_TotalTaxRatio: float  # 平均销售税费率无，此处读取销售税费率
    Money_Discount: float  # 资金贴现率


class data1(BaseModel):
    Stim_ValidPeriod_Average: float  # 平均有效期
    Stim_IncreOil_Average: float  # 平均措施增油
    StimCost_Average: float  # 平均作业成本
    Oil_OprCost: float  # 吨油操作成本
    Oil_Price: float  # 平均油价无，此处读取为原油价格
    StimOil_CommodityRatio: float  # 原油商品率
    OilSale_TotalTaxRatio: float  # 平均销售税费率无，此处读取销售税费率
    Money_Discount: float  # 资金贴现率
    parameter_set: list


class cal_sensitive(BaseModel):
    ValidPeriod: float
    Discount: float
    IncreOil: float
    OilPrice: float
    OilCommodityRatio: float
    TotalTaxRatio: float
    OilOprCost: float
    StimCost: float


class PlanProjName(BaseModel):
    DvpUnit_OilStim_PlanProj_Name: str


class DvpUnitName(BaseModel):
    DvpUnit_Name: str